<?php

namespace app\modules\v1\models;

use Yii;

/**
 * This is the model class for table "{{%_userfile}}".
 *
 * @property integer $id
 * @property string $telephone
 * @property string $headico
 * @property string $idcard
 */
class Userfile extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%_userfile}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['telephone'], 'required','message' => 401],
            [['telephone'],'unique','message' => 402],
            [['telephone'], 'string', 'length' => [11,11],'tooShort' => 403,'tooLong' => 403],
            [['headico', 'idcard'], 'string', 'max' => 128],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'telephone' => 'Telephone',
            'headico' => 'Headico',
        ];
    }
}
